<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Hex</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">Hex()</font></b></p>
<p><b>语法</b></p><blockquote>

Result$ = <font color="#006666"><b>Hex</b></font>(Value.q [, Type])</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Converts a quad numeric number into a string, in hexadecimal format. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Value.q</i></td>
<td width="90%"> 
 
The number to convert. 

 

</td></tr>
<tr><td><i>Type (optional)</i></td>
<td> 
 
If the value should be handled as another type, one of the following value can be specified: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Byte</font>   : The value is handled as a byte number, ranging from 0 to 255
  <font color="#924B72">#PB_Ascii</font>  : The value is handled as a ascii character, ranging from 0 to 255
  <font color="#924B72">#PB_Word</font>   : The value is handled as a word number, ranging from 0 to 65535
  <font color="#924B72">#PB_Unicode</font>: The value is handled as a unicode character, ranging from 0 to 65535
  <font color="#924B72">#PB_Long</font>   : The value is handled as a long number, ranging from 0 to 4294967296
  <font color="#924B72">#PB_Quad</font>   : The value is handled as a quad number, ranging from 0 to 18446744073709551615
</font></pre>

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>



A string holding the hexadecimal representation of the specified value. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(12) <font color="#006666">; Will display "C"</font>
  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(1234567890) <font color="#006666">; Will display "499602D2"</font>
</font></pre>

</blockquote><p><b>Remarks</b></p><blockquote>



If leading zero are needed in the output string, use the <a href="rset.html">RSet()</a> function as follows: 

 

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Debug</font></b> <font color="#006666">RSet</font>(<font color="#006666">Hex</font>(12), 4, "0") <font color="#006666">; Will display "000C"</font>
</font></pre>

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(-1)
  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(-1, <font color="#924B72">#PB_Byte</font>)
  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(-1, <font color="#924B72">#PB_Word</font>)
  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(-1, <font color="#924B72">#PB_Long</font>)
  <b><font color="#006666">Debug</font></b> <font color="#006666">Hex</font>(-1, <font color="#924B72">#PB_Quad</font>)    <font color="#006666">; quad value is the default</font>
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="str.html">Str()</a>, <a href="val.html">Val()</a> and <a href="bin.html">Bin()</a>. 

 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=findstring.html>FindString()</a> - <a href=index.html>String Index</a> - <a href=insertstring.html>InsertString()</a> -&gt;



</body></html>